package com.cooud.order.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: DongGuoZhen
 * @Date: 2025/03/16/13:29
 * @Description:
 */
// 有url属性，则会使用该url作为请求地址，否则会使用服务名作为请求地址
@FeignClient(value = "weather-client",url = "http://aliv18.data.moji/com")
public interface WeatherFeignClient {


//    发送请求的具体路径
    @PostMapping("/whapi/json/alicityweather/condition")
    String  getWeather(@RequestHeader("Authorization") String auth,
                       @RequestParam("token") String token,
                       @RequestParam("cityId") String cityId);
}
